 <!doctype html>
<html class="no-js" lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><?php echo @$title; ?></title>
    <script src="<?= BASE_URI ?>js/jquery.min.js"></script>
     <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Open Sans">
    <script type="text/javascript" src="<?= BASE_URI ?>jRating-master/jquery/jquery.js"></script>
    <link rel="stylesheet" href="<?= BASE_URI ?>css/app.css" />
    <link rel="stylesheet" href="<?= BASE_URI ?>css/main.css" />
    <link rel="stylesheet" href="<?= BASE_URI ?>css/animate.css" />
    <link rel="shortcut icon" href="<?= BASE_URI ?>img/icons/favicon.ico">
    <link rel="stylesheet" href="<?= BASE_URI ?>font-awesome/css/font-awesome.min.css" />
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"> 
   <!-- <script src="//code.jquery.com/ui/1.11.2/jquery-ui.js" defer="defer"></script> -->
    <script src="<?= BASE_URI ?>js/jquery-ui.js"></script>
    <script src="<?= BASE_URI ?>js/modernizr.js"></script>
    <script src="<?= BASE_URI ?>js/foundation.min.js"></script>
    <script src="<?= BASE_URI ?>js/jquery.oembed.js"></script> <!-- global -->
    <script src="<?= BASE_URI ?>public/vendor/Mustache/mustache.js-master/mustache.js"></script>    <!-- global -->

    <link rel="stylesheet" href="<?= BASE_URI ?>css/form-main.css" />


    <link href="<?= BASE_URI ?>css/select2-bootstrap.css" rel="stylesheet"/>
    <link href="<?= BASE_URI ?>css/select2.css" rel="stylesheet"/>
    <script src="<?= BASE_URI ?>js/select2.js"></script>

    <!-- <link rel="stylesheet" type="text/css" href="<?=BASE_URI ?>slick/slick.css"/>-->
    <script type="text/javascript" src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
    <script type="text/javascript" src="<?= BASE_URI ?>slick/slick.js"></script>

    
    <script src="//js.pusher.com/2.2/pusher.min.js"></script> <!-- global -->
    <script src="<?=BASE_URI?>js/time-ago.js"></script> <!-- global -->
   <!-- <script src="https://cdn.socket.io/socket.io-1.2.0.js"></script> -->
    
    <script src='<?=BASE_URI?>js/jquery.imagedrag.js' type='text/javascript' defer="defer"></script> <!-- global -->
    <script src='<?=BASE_URI?>js/jquery.imagedrag.min.js' type='text/javascript' defer="defer"></script> <!-- global -->
    <script src='<?=BASE_URI?>js/draggable_background.js' type='text/javascript' defer="defer"></script> <!-- global -->
    

    <link rel="stylesheet" href="<?= BASE_URI ?>jRating-master/jquery/jRating.jquery.css" type="text/css" />
    <script type="text/javascript" src="<?= BASE_URI ?>jRating-master/jquery/jRating.jquery.js"></script>

  </head>

	<body>
      <script>


        //config cloudinary
       //$.cloudinary.config({ cloud_name: 'behomebased-ph', api_key: '996474664646468'});

        //GLOBAL JAVASCRIPT VARIABLE 
        var URL = "<?= BASE_URI ?>";  
     //   var socket = io.connect('http://127.0.0.1:8001');
        var SS_USER_ID = "<?= $this->session->get('user_id'); ?>";
        var SS_PROF_PIC = "<?= $this->session->get('profile_pic'); ?>";
        var SS_FULLNAME = "<?= $this->session->get('fullname'); ?>";
        var CURR_DATE = "<?= CURR_DATE ?>";
        var PUSHER_APP_KEY = "52c72586317ecdcdccd3";
        var PUSHER_APP_ID = "106312";
        var PUSHER_APP_SECRET = "ecbe22ae5693e2c053f6";

        var PUSHER_APP_KEY = "853bcc01151a6ec2ac61";
        var PUSHER_APP_ID = "110158";
        var PUSHER_APP_SECRET = "7fd1cddc5f4c1115f96a";
        
       // GLOBAL FUNCTION HERE

        function Linkify(inputText) {
            //URLs starting with http://, https://, or ftp://
            var replacePattern1 = /(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim;
            var replacedText = inputText.replace(replacePattern1, '<a href="$1" target="_blank">$1</a>');

            //URLs starting with www. (without // before it, or it'd re-link the ones done above)
            var replacePattern2 = /(^|[^\/])(www\.[\S]+(\b|$))/gim;
            var replacedText = replacedText.replace(replacePattern2, '$1<a href="http://$2" target="_blank">$2</a>');

            //Change email addresses to mailto:: links
            var replacePattern3 = /(\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,6})/gim;
            var replacedText = replacedText.replace(replacePattern3, '<a href="mailto:$1">$1</a>');

            return replacedText
        }
      </script>
            <?php $this->view->partial('templates/templates'); ?>
          <?php 
          	if(@$page_name=='Index')
            {
              //$this->view->partial('common/header');
            }
              $this->view->partial('common/header_user'); 

            if((@$page_name=='Profile') || (@$page_name=='Feeds') || (@$page_name=='Search') || (@$page_name=='Messages') || (@$page_name=='Reviews') || (@$page_name=='View') || (@$page_name=='Ranking') || (@$page_name=='FullStory') || (@$page_name=='Group') || (@$page_name=='MyGroup') || (@$page_name=='Jobs' ) || (@$page_name=='Events' ) || (@$page_name=='Forum' ) || (@$page_name=='SuggestEdit' ) || (@$page_name=='ForumView' ))
            {
              $this->view->partial('common/sub_header');
            }
          
          ?>
		    
          <?php $this->view->partial($content); ?>
          <?php
            if(@$page_name=='Index') { $this->view->partial('common/modals'); } ?>
          <?php $this->view->partial('common/settings'); ?>
          <?php $this->view->partial('common/change_dp'); ?>

    <script src="<?=BASE_URI?>js/app.js"></script>
    <script src="<?=BASE_URI?>js/modal_action.js"></script>
    <script src="<?=BASE_URI?>js/loading.js"></script>

<?php
    if(@$page_name=='Index') { ?>
    <script src="<?=BASE_URI?>js/blur.min.js"></script>
    <script>
        $(document).ready( function() {
            $('#body-main-bg').blurjs({
                source: '.body-main',
                radius: 5,
                overlay: 'rgba(100, 100, 100, .2)'
            });
        });
    </script>
<?php } ?>

   <!-- <script>
     var txt = $('.textarea-xpnd'),
        hiddenDiv = $(document.createElement('div')),
        content = null;

        txt.addClass('txtstuff');
        hiddenDiv.addClass('hiddendiv common');

        $('body').append(hiddenDiv);
            txt.on('keyup', function () {
              content = $(this).val();
        content = content.replace(/\n/g, '<br>');
              hiddenDiv.html(content + '<br class="lbr">');
        $(this).css('height', hiddenDiv.height());
            });
    </script>-->

    
	</body>
</html>